﻿using System.Web;
using DMS.Business;

namespace DMS.BO.Security.Principal
{
    public static class PermissionUtility
    {
        /// <summary>
        /// tuan.tran
        /// kiem tra quyen cua user
        /// </summary>
        /// <param name="permission"></param>
        /// <returns></returns>
        public static bool HasPermission(DMSPermission permission)
        {
            return AccountService.HasPermission(int.Parse(HttpContext.Current.User.Identity.Name), (int) permission);
        }
    }
}